/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;


import java.sql.Date;
import java.sql.Time;
import java.text.DateFormat;

/**
 *
 * @author Edouard
 */
public class DateTimeFormatter {
    
    public static Date setDate(int jour,int mois,int annee){
        String d = annee +"-"+ mois +"-"+ jour;
        return Date.valueOf(d);
        
    }
    public static Date setDate(int mois,int annee){
        String d = annee +"-"+ mois;
        return Date.valueOf(d);
        
    }
    
    public static Time setTime(int heure,int minute){
        String t = heure +":"+ minute +":"+ 00;
        return Time.valueOf(t);
    }
    
    public static String setAnnee(Date date)
    {
        String[] toto = String.valueOf(date.getYear()).split("");
        return toto[1] + toto[2];
    }

}
